package com.fh.model;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;

@Data
@Document(indexName = "sys_product",type = "pms_product",shards = 1,replicas = 0)
public class ProductSearch {
    @Id
    private Long id;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String name;
    @Field(type = FieldType.Integer)
    private Integer publish_status;
    @Field(type = FieldType.Integer)
    private Integer new_status;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String sub_title;
    @Field(type = FieldType.Text)
    private String brand_name;
    private String product_category_name;
    @Field(type = FieldType.Text)
    private String pic;
    @Field(type = FieldType.Integer)
    private Integer sale;
    @Field(type = FieldType.Double)
    private BigDecimal price;
    @Field(type = FieldType.Integer)
    private Integer stock;
    @Field(type = FieldType.Double)
    private BigDecimal promotion_price;
    @Field(type = FieldType.Text)
    private String sp_data;
    @Field(type = FieldType.Text)
    private String album_pics;
    @Field(type = FieldType.Text)
    private String sku_code;
}
